Line_Simplification_Group

Line simplification Group

Operations in this group are used to simplify topological links. Simplifying a link will modify all the geographic features whose geometry uses that link. Only topologically structured features may be simplified with these operations. Four algorithms are available, three for simplifying links (Douglas and Peucker, Visvalingam, Weighted Effective Area) and one smoothing (Gaussian Smoothing) and each of them has two operations. One called Simplify_Link_xxx: it will simplify the link passed using the specific algorithm chosen. This will never simplify a link in such a way that the result intersects another link. If the algorithm produces such a result, it is not validated and the link remains unchanged. However, such links will be marked as having failed to simplify so that their simplification can be retired at the end. This is why a second operation called process_xxx_failures is available. This will retry all the links which have been marked. Each will be split in two, both parts will be simplified independently and subsequently rejoined. If any part fails again, it is decomposed further. The result is a line which is simplified as much as possible, without generating topological inconsistencies.

For all of these operations, 1Generalise actions have been preconfigured and are available in the "1Generalise Algorithms" folder of the "Actions" tab. They are described here with the following operations:

Douglas and Peucker

The algorithm simplifies a line using a global approach. It takes one parameter maxDist that represents the maximum distance that is allowed between a point of the original line and its closest position on the simplified one. It starts with creating a simplified line joining the two end nodes. It then looks for the point of the original line which is the furthest from the simplified line. If it is further away than the maxDist, then the point is added to the simplified line and the process iterates. Otherwise, the algorithm stops.

Operations available:

  • simplify_link_douglas_peucker
    • Parameter 1: Object: The link that needs simplifying.
    • Parameter 2: Double: maxDist, the maximum distance from a point of the original line and the closest position on the simplified line.
  • Process_douglas_peucker_simplification_failures
    • This operation has no arguments, it must be called after all links have been simplified using simplify_link_douglas_peucker. It will only reprocess those which have failed to simplify in the first attempt.

1Generalise actions available, using these operations:

  • Apply Douglas Peucker On Road Links
    • This action is located under 1Generalise algorithms > Roads

    The action is set to simplify ROAD_TGT features using simplify_link_douglas_peucker. It uses two class parameters that need to be defined for ROAD_TGT:

    • DouglasPeuckerSimplificationTolerance: This value will be passed to the simplification algorithm as the maxDist parameter.
    • SimplificationPriority: When a link is shared by several features of different types (and therefore using potentially different simplification tolerances), the one which has the highest SimplificationPriority will have control over the link.
  • Re-apply Douglas Peucker on Failed Edges
    • This action is located under 1Generalise Algorithms > Generic

    This action processes the links which have failed to simplify the first time, by splitting them and simplifying parts independently.

    Example:  

    The first Figure in this example shows the source data on the left and the result of calling "Apply Douglas Peucker On Road Links" on the right.

    The source data and resulting data

    Some of the roads in purple did not get simplified as the simplification process would have resulted in the simplified road crossing the surrounding landcover features. To ensure this didn't happen they were left unchanged and marked as having failed to simplify.

    The second example Figure shows the result of the initial simplification on the left, and the result of calling "Re-apply Douglas Peucker on Failed Edges" on the right.

    The result of Re-apply Douglas Peucker on Failed Edges

    Note that all lines are now simplified, they may be locally under simplified (regarding the tolerance used), but they are simplified as much as possible while still ensuring the topological consistency of the result.

  • This process filters the vertices on line or area features using the Visvalingam algorithm. It iteratively removes the vertices on line work which, when removed, causes the least amount of area displacement. This is done by evaluating the size of the triangles formed by three consecutive vertices. This results in the progressive elimination of geometric characteristics, from the smallest to the largest. It is controlled by a parameter specifying the area below which local triangles will be removed.

    Operations available:

    • simplify_link_visvalingham
      • Parameter 1: Object: The link that needs simplifying.
      • Parameter 2: Double: minArea. If the area between the tree vertices (x-1, x, x+1) is smaller than this value, the vertex x is removed from the simplified geometry.
    • Process_visvalingam_simplification_failures

      This operation has no arguments, it must be called after all links have been simplified using simplify_link_visvalingam. It will only reprocess those which have failed to simplify in the first attempt.

    1Generalise actions available, using these operations:

    • Apply Visvalingam On Water Line Links

      This action is located under 1Generalise Algorithms > River Line

      This action is set to simplify ROAD_TGT features using simplify_link_visvalingam. It uses two class parameters that need to be defined for ROAD_TGT:

      • VisvalingamMinimumArea: This value will be passed to the simplification algorithm as the minArea parameter.
      • SimplificationPrioirty: When a link is shared by several features of different types (and therefore using potentially different simplification tolerances), the one which has the highest SimplificationPriority will have control over the link.
    • No "Re-apply Visvalingam On Failed Edges" is available, but it would be easy to reproduce it, using "Re-apply Douglas Peucker on Failed Edges" as a model.

Weighted effective area

Weighted Effective Area is an extension of the Visvalingam algorithm, where weights are applied to triangle areas to decide in which order the should be removed. The aim is to better preserve the overall shape of the geomerty.

Operations available:

  • simplify_link_weighted_effective_area
    • Parameter 1: Object: The link that needs simplifying.
    • Parameter 2: Double: minArea. If the weighted area between the tree vertices (x-1, x, x+1) is smaller than this value, the vertex x is removed from the simplified geometry.
    • Process_weighted_effecvtive_area_simplification_failures

      This operation has no arguments, it must be called after all links have been simplified using simplify_link_weighted_effective_area. It will only reprocess those which have failed to simplify in the first attempt.

1Generalise actions available, using these operations:

  • Apply Weighted Effective Area On Generic Area Links

    This action is located under 1Generalise Algorithms > Generic Area. This action is set to simplify GENERIC_AREA_TGT features using simplify_link_weighted_effective_area. It uses two class parameters that need to be defined for GENERIC_AREA_TGT:

    • WeightedEffectiveAreaMiniumumArea: This value will be passed to the simplification algorithm as the minArea parameter.
    • SimplificationPriority: When a links is shared by several different features of different types (and therefore using potentially different simplification tolerances), the one which has the highest SimplificationPriority will have control over the link.
  • Apply Weighed Effective Area On Generic Line Links

    This action is located under 1Generalise Algorithms > Generic Line. It is very similar to action above, but will process linear features instead of areas, and is configured to process features of class GENERIC_LINE_TGT.

  • Apply Weighted Effective Area On Landcover Links

    This action is located under 1Generalise Algorithms> Landcover. Again, this action is similar to "Weighted Effective Area On Generic Area Links", but will process LANDCOVER_TGT features.

  • Apply Weighted Effective Area On Water Area Links

    This action is located under 1Generalise Algorithms > Water Area

    This action is similar to Apply “Weighted Effective Area On Generic Area Links” but will process WATER_AREA_TGT features.

  • Apply Weighted Effective Area On Water Line Links

    This action is located under 1Generalise Algorithms> Water Line

    This action is similar to Apply "Weighted Effective Area On Generic Line Links" but will process WATER_LINE_TGT features.

  • Re-apply Weighted Effective Area On Failed Edges

    This action is located under 1Generalise Algorithms > Generic

    This action reprocesses the links which have failed to simplify the first time using any of the Apply Weighted Effective Area actions above, by splitting them and simplifying parts independently.

Gaussian Smoothing

The Gaussian smoothing operation attenuates the shape details on the line work. It's particularly suited for features which have naturally rounded shapes, like bodies of water, contours and natural land cover. The aim is to smooth out the least significant shape artefacts. The downside is that it tends to attenuate the largest shape details at the same time.

Operations available:

  • Simplify_link_gaussian_smooth
    • Parameter 1: Object: The link that needs smoothing.
    • Parameter 2: Double: Sigma. The larger this value, the stronger the smoothing will be.
    • Parameter 3: Double: This value is a minimum distance between consecutive vertices. The line will be densified by adding points until no consecutive points are further apart than this value. The smoothing will work better if the points are fairly regularly spaced, at a distance smaller than sigma. If not, use this parameter to enforce it. A value of half or quarter of sigma is usually fine.
    • Parameter 4: Double: As the densification can potentially add lots of points to the line, which can be expensive to commit (as we are working with topology enabled). This value will be used as a tolerance for a Douglas and Peucker simplification, to reduce the number of vertices prior to committing the change. Usually this value should stay low to avoid disrupting the effect of the smoothing.
  • Process_gaussian_smooth_failure
    • This operation has no arguments, it must be called after all links have been simplified using simplify_link_weighted_effective_area. It will only reprocess those which have failed to simplify in the first attempt.

1Generalise actions available, using these operations:

  • Apply Gaussian Smoothing On Generic Area Links
  • Apply Gaussian Smoothing On Generic Line Links
  • Apply Gaussian Smoothing On Landcover Links
  • Apply Gaussian Smoothing On Water Area Links
  • Apply Gaussian Smoothing On Water Line Links

Example:  

The first figure shows the result of the smoothing applied to water bodies (shown here in red) using sigma= 15, minimum distance = 7 and the Douglas & Peucker tolerance is set to 0.5.

Water bodies with smoothing applied

The large water feature in the middle of the picture had 56 vertices in the source data and 48 in its generalised form.

The next feature illustrates the action of the priority parameter which helps the system decide which feature controls a link which is shared by other features. In the figure, all the water features (in red) have the highest priority, and all the other features (land cover features) have a similar lower priority value.

Water features with a high priority

Landcover features are simplified but not smoothed, while water features are smoothed but not simplified. The Figure shows that all the links separating water from landcover have been smoothed, rather than simplified. This is because the water features have a higher simplification priority.